namespace Agile.Genie.Generators
{
    /// <summary>
    /// Encapsulates details of method parameters for code generation.
    /// </summary>
    public class MethodParameter
    {
        private readonly string _description = string.Empty;
        private readonly string _name = string.Empty;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">Name of the parameter</param>
        /// <param name="description">Description of the parameter</param>
        private MethodParameter(string name, string description)
        {
            _name = name;
            _description = description;
        }

        /// <summary>
        /// Gets the description of the parameter
        /// </summary>
        public string Description
        {
            get { return _description; }
        }

        /// <summary>
        /// Gets the name of the parameter
        /// </summary>
        public string Name
        {
            get { return _name; }
        }

        /// <summary>
        /// Instantiate a new MethodParameter
        /// </summary>
        /// <param name="name">Name of the parameter</param>
        /// <param name="description">Description of the parameter</param>
        public static MethodParameter Build(string name, string description)
        {
            return new MethodParameter(name, description);
        }

        /// <summary>
        /// Instantiate a new MethodParameter
        /// </summary>
        /// <param name="name">Name of the parameter</param>
        public static MethodParameter Build(string name)
        {
            return Build(name, string.Empty);
        }
    }
}